import $ajax from '../service/ajax'
export default {
        getViewIframeSrc(context, url, params) {
            $ajax.getJson(url, params, function(req) {

                context.commit('changeViewIframeSrc', req.data);
            })
        },
        getKpiTreeData(context, url, params) {
            $ajax.getJson(url, params, function(req) {
                console.log(req)
                context.commit('addKpiTreeData', req.data);
            })
        },
        getViewList(context, url, params) {
            $ajax.getJson(url, params, function(req) {
                console.log(req.data)
                context.commit('getViewList', req.data);
            })
        },
        getChartsJson(context, url, params) {
            $ajax.getJson(url, params, function(req) {
                console.log(req.data)
                context.commit('getLoadEchartsData', req.data);
            })
        }

}